Skip to content

feat: project selection, hotkey warnings, hands-free mode#3

Merged
guohai merged 14 commits into
mainfrom
feature/project-select-and-voice
May 29, 2026
Merged

feat: project selection, hotkey warnings, hands-free mode#3
guohai merged 14 commits into
mainfrom
feature/project-select-and-voice

Conversation

@guohai

@guohai guohai commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Current project selection

  • AstationHubManager now has selectedProject / effectiveProject. Auto-selects first project on load; reconciles on refresh.
  • Voice coding, ConvoAI agent, and token generation all use the selected project instead of projects.first.
  • Projects window: double-click a row to select — shows blue "Selected: <name>" toast that fades out. Checkmark on selected project name. Vertically centered name/status cells.
  • App ID / Certificate: masked with ellipsis in the middle (first 6...last 6). Copy still copies full value.
  • Created column added with monospaced-digit timestamp (yyyy-MM-dd HH:mm:ss).
  • Join RTC Channel picker pre-selects the current project.
  • Menubar shows current project name.

Hotkey conflict warnings

  • HotkeyManager tracks registration failures (voiceHotkeyFailed / videoHotkeyFailed).
  • Warning items shown in menubar menu when Ctrl+V or Ctrl+Shift+V can't be registered.
  • print() calls replaced with Log.

Hands-free mode always available

  • Removed isInChannel guard on "Start Hands-Free Mode" menu item — startHandsFree() already auto-joins RTC internally.

RTC defaults

  • Encryption default: OFF (.none), moved to top of picker list.
  • Channel names: astation-<8-random-hex> for both voice coding and manual join UI.

Session expiry

  • Friendly "Session expired — please sign in again" message instead of raw HTTP 400 error when token refresh fails.

Test plan

  • swift build succeeds
  • 114 tests pass, 0 failures
  • Manual: Sign in → projects load → first auto-selected → menubar shows project name
  • Manual: Projects window → double-click project → blue toast + checkmark
  • Manual: "Start Hands-Free Mode" visible without joining channel first
  • Manual: Join RTC Channel defaults to selected project, encryption OFF

Generated with SMT smt@agora.build

guohai added 14 commits May 29, 2026 09:03
Add selectedProject / effectiveProject to AstationHubManager. Auto-
selects first project on load; reconciles on refresh. Voice coding,
ConvoAI agent, and token generation all use effectiveProject instead of
projects.first. Projects window shows checkmark on selected project;
clicking a row changes it. Menubar shows current project name.

🤖 Built with SMT <smt@agora.build>
Track voiceHotkeyFailed / videoHotkeyFailed in HotkeyManager. Display
warning items in the menubar status menu when registration fails.
Replace print() with Log calls. Also remove isInChannel guard on
Start Hands-Free Mode menu item — startHandsFree() already auto-joins
RTC internally.

🤖 Built with SMT <smt@agora.build>
When token refresh fails (e.g. refresh token expired after days),
show "Session expired — please sign in again" instead of the raw
HTTP 400 error. Post .credentialsChanged to update the UI.

🤖 Built with SMT <smt@agora.build>
- Change RTCEncryptionMode.manualJoinDefault from .aes256Gcm2 to .none
  and move "None" to top of the picker list.
- Voice coding channel: "astation-<8-hex-random>" instead of
  "astation-default". Manual join UI gets the same pattern.

🤖 Built with SMT <smt@agora.build>
Change project selection from single-click to double-click. Show a
green "Selected: <name>" toast next to the "Projects" header that
fades out over 4 seconds.

🤖 Built with SMT <smt@agora.build>
- Toast text color: green → blue
- Cancel in-flight animation before showing new toast so it always
  appears on rapid double-clicks
- Project name column uses NSTableCellView with centerY constraint
  for vertical centering

🤖 Built with SMT <smt@agora.build>
Use sizeToFit on header to get actual width, position toast at
headerLabel.maxX + 8 with same y origin and height.

🤖 Built with SMT <smt@agora.build>
Display first 6 + "..." + last 6 chars (~15 chars) for both App ID
and Certificate columns. Copy button still copies the full value.
Narrowed column widths to match.

🤖 Built with SMT <smt@agora.build>
- Change lineBreakMode from byTruncatingTail to byClipping on App ID
  and Certificate cells so the masked text (first6...last6) shows
  cleanly without extra system ellipsis.
- Add "Created" column showing yyyy-MM-dd HH:mm from the project's
  unix timestamp.

🤖 Built with SMT <smt@agora.build>
Use autolayout lastBaselineAnchor to align the blue toast text with
the "Projects" header regardless of font size difference. Bump toast
font to 13pt for better visual weight. Date format now includes
seconds (yyyy-MM-dd HH:mm:ss).

🤖 Built with SMT <smt@agora.build>
Autolayout topAnchor with negative offset pushed both labels off-screen.
Switch back to frame-based positioning at y=410 which worked before.
Use same bold 14pt font for both header and toast so they align
naturally at the same origin and height.

🤖 Built with SMT <smt@agora.build>
🤖 Built with SMT <smt@agora.build>
@guohai guohai force-pushed the feature/project-select-and-voice branch from c3e52f3 to 54d6fed Compare May 29, 2026 16:03
@guohai guohai merged commit 61c87ea into main May 29, 2026
3 checks passed
@guohai guohai deleted the feature/project-select-and-voice branch May 29, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant